package com.zxs.admin.controller;

import com.zxs.admin.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import parm.CartListParm;
import parm.PageParam;
import pojo.User;
import utils.R;

/**
 * @author zxs
 * *9 16:10
 */
@RestController
@RequestMapping("user")
public class UserListController {

    @Autowired
    private UserService userService;

    @GetMapping("list")
    public R listPage(PageParam pageParam){

        return userService.listPage(pageParam);
    }
    @PostMapping("remove")
    public R removeUser(CartListParm cartListParm){
        return  userService.removeUser(cartListParm);
    }

    @PostMapping("update")
    public R update( User user){
        return  userService.update(user);
    }

    @PostMapping("save")
    public R save(User user){
        return userService.save(user);
    }

}
